home *** CD-ROM | disk | FTP | other *** search
/ Elite College Girls 1 / Elite College Girls - Volume 1.iso / pc / shared.dir / 01961.ls < prev    next >
Encoding:
Text File  |  1996-02-02  |  10.0 KB  |  251 lines

  1. on @ whichSprite
  2.   if the type of sprite whichSprite = 0 then
  3.     put "There is no sprite in channel " & whichSprite & "."
  4.   else
  5.     set item1 to "Sprite loc: " & point(the locH of sprite whichSprite, the locV of sprite whichSprite)
  6.     set centerH to ((the right of sprite whichSprite - the left of sprite whichSprite) / 2) + the left of sprite whichSprite
  7.     set centerV to ((the bottom of sprite whichSprite - the top of sprite whichSprite) / 2) + the top of sprite whichSprite
  8.     set item2 to "   Sprite center: " & point(centerH, centerV)
  9.     put item1 & item2
  10.   end if
  11. end
  12.  
  13. on ? whichSprite
  14.   if the type of sprite whichSprite = 0 then
  15.     put "There is no sprite in channel " & whichSprite & "."
  16.   else
  17.     set whichCast to the castNum of sprite whichSprite
  18.     set whichCastName to whichCast
  19.     if the name of cast whichCast > 0 then
  20.       set whichCastName to QUOTE & the name of cast whichCast & QUOTE
  21.     end if
  22.     set item1 to "Sprite: " & whichSprite & "   Cast: " & whichCastName & "   Type: " & the type of sprite whichSprite
  23.     set item1 to item1 & ", " & the castType of cast whichCast
  24.     set item2 to "   Ink: " & the ink of sprite whichSprite
  25.     set item3 to "   Sprite loc: " & point(the locH of sprite whichSprite, the locV of sprite whichSprite)
  26.     set item4 to "   Top left corner: " & point(the left of sprite whichSprite, the top of sprite whichSprite)
  27.     set item5 to "   Bottom right corner: " & point(the right of sprite whichSprite, the bottom of sprite whichSprite)
  28.     set item6 to "   Stretch: " & the stretch of sprite whichSprite & "   Cursor: " & the cursor of sprite whichSprite
  29.     set item7 to RETURN & RETURN & "To activate sprite [ whichSprite ] , copy this into your script:    "
  30.     set item8 to "activate [ whichSprite ] , " & whichCastName & ", " & the type of sprite whichSprite & ", " & the ink of sprite whichSprite & ", "
  31.     if the stretch of sprite whichSprite = 0 then
  32.       set item9 to the locH of sprite whichSprite & ", " & the locV of sprite whichSprite & ", "
  33.       set item9 to item9 & QUOTE & QUOTE & ", " & QUOTE & QUOTE & ", " & QUOTE
  34.     else
  35.       set item9 to the left of sprite whichSprite & ", " & the top of sprite whichSprite & ", " & QUOTE & "stretch to:" & QUOTE & ", "
  36.       set item9 to item9 & the right of sprite whichSprite & ", " & the bottom of sprite whichSprite & RETURN
  37.     end if
  38.     put item1 & item2 & item3 & item4 & item5 & item6 & item7 & item8 & item9
  39.   end if
  40. end
  41.  
  42. on ! whichSprite
  43.   if value(whichSprite) > 0 then
  44.     if the type of sprite whichSprite = 0 then
  45.       put "Cursor location: " & point(the mouseH, the mouseV)
  46.       put "There is no sprite in channel " & whichSprite & "."
  47.     else
  48.       put "Cursor location: " & point(the mouseH, the mouseV)
  49.       set item1 to "Cursor location, relative to the top left corner of sprite " & whichSprite & ": "
  50.       set item2 to point(the mouseH - the left of sprite whichSprite, the mouseV - the top of sprite whichSprite)
  51.       put item1 & item2
  52.     end if
  53.   else
  54.     put "Cursor location: " & point(the mouseH, the mouseV)
  55.   end if
  56. end
  57.  
  58. on setActivateScript whichSprite, whichSprite2
  59.   if the type of sprite whichSprite = 0 then
  60.     set activateScript to "nothing"
  61.   else
  62.     set whichCast to the castNum of sprite whichSprite
  63.     set whichCastName to whichCast
  64.     if the name of cast whichCast > 0 then
  65.       set whichCastName to QUOTE & the name of cast whichCast & QUOTE
  66.     end if
  67.     set item8 to "activate " & whichSprite2 & ", " & whichCastName & ", " & the type of sprite whichSprite & ", " & the ink of sprite whichSprite & ", "
  68.     if the stretch of sprite whichSprite = 0 then
  69.       set item9 to the locH of sprite whichSprite & ", " & the locV of sprite whichSprite & ", "
  70.       set item9 to item9 & QUOTE & QUOTE & ", " & QUOTE & QUOTE & ", " & QUOTE & QUOTE
  71.     else
  72.       set item9 to the left of sprite whichSprite & ", " & the top of sprite whichSprite & ", " & QUOTE & "stretch to:" & QUOTE & ", "
  73.       set item9 to item9 & the right of sprite whichSprite & ", " & the bottom of sprite whichSprite
  74.     end if
  75.     set activateScript to item8 & item9
  76.   end if
  77.   return activateScript
  78. end
  79.  
  80. on activate whichSprite, targetCast, targetType, targetInk, targetH, targetV, stretchBool, targetH2, targetV2
  81.   puppetSprite(whichSprite, 1)
  82.   set the type of sprite whichSprite to targetType
  83.   set the castNum of sprite whichSprite to the number of cast targetCast
  84.   set the ink of sprite whichSprite to targetInk
  85.   set the foreColor of sprite whichSprite to 255
  86.   set the backColor of sprite whichSprite to 0
  87.   set the locH of sprite whichSprite to targetH
  88.   set the locV of sprite whichSprite to targetV
  89.   if stretchBool = EMPTY then
  90.     set the stretch of sprite whichSprite to 0
  91.   else
  92.     set the stretch of sprite whichSprite to 1
  93.     if targetH2 <> EMPTY then
  94.       spriteBox(whichSprite, targetH, targetV, targetH2, targetV2)
  95.     end if
  96.   end if
  97.   set the immediate of sprite whichSprite to 1
  98. end
  99.  
  100. on deactivate spriteList
  101.   if listp(spriteList) then
  102.     set repeatLimit to count(spriteList)
  103.     repeat with theCount = 1 to repeatLimit
  104.       set whichSprite to getAt(spriteList, 1)
  105.       set the type of sprite whichSprite to 0
  106.       puppetSprite(whichSprite, 0)
  107.       deleteAt(spriteList, 1)
  108.     end repeat
  109.   end if
  110. end
  111.  
  112. on store spriteList
  113.   global gStoredSpriteInfo
  114.   if listp(spriteList) then
  115.     if not listp(gStoredSpriteInfo) then
  116.       set gStoredSpriteInfo to []
  117.     end if
  118.     set repeatLimit to count(spriteList)
  119.     repeat with theCount = 1 to repeatLimit
  120.       set x to getAt(spriteList, 1)
  121.       set spriteXinfo to [the type of sprite x]
  122.       if the type of sprite x > 0 then
  123.         append(spriteXinfo, the puppet of sprite x)
  124.         append(spriteXinfo, the castNum of sprite x)
  125.         append(spriteXinfo, the ink of sprite x)
  126.         append(spriteXinfo, the foreColor of sprite x)
  127.         append(spriteXinfo, the backColor of sprite x)
  128.         append(spriteXinfo, the locH of sprite x)
  129.         append(spriteXinfo, the locV of sprite x)
  130.         if the castType of cast the castNum of sprite x = #digitalVideo then
  131.           append(spriteXinfo, the movieTime of sprite x)
  132.           append(spriteXinfo, the movieRate of sprite x)
  133.         end if
  134.       end if
  135.       setAt(gStoredSpriteInfo, x, spriteXinfo)
  136.       deleteAt(spriteList, 1)
  137.     end repeat
  138.   end if
  139. end
  140.  
  141. on restore spriteList
  142.   global gStoredSpriteInfo
  143.   if listp(spriteList) then
  144.     if not listp(gStoredSpriteInfo) then
  145.       set gStoredSpriteInfo to []
  146.     end if
  147.     set repeatLimit to count(spriteList)
  148.     repeat with theCount = 1 to repeatLimit
  149.       set x to getAt(spriteList, 1)
  150.       if count(gStoredSpriteInfo) >= x then
  151.         set spriteXinfo to getAt(gStoredSpriteInfo, x)
  152.         if listp(spriteXinfo) then
  153.           set the type of sprite x to getAt(spriteXinfo, 1)
  154.           if getAt(spriteXinfo, 1) > 0 then
  155.             set the puppet of sprite x to getAt(spriteXinfo, 2)
  156.             set the castNum of sprite x to getAt(spriteXinfo, 3)
  157.             set the ink of sprite x to getAt(spriteXinfo, 4)
  158.             set the foreColor of sprite x to getAt(spriteXinfo, 5)
  159.             set the backColor of sprite x to getAt(spriteXinfo, 6)
  160.             set the locH of sprite x to getAt(spriteXinfo, 7)
  161.             set the locV of sprite x to getAt(spriteXinfo, 8)
  162.             if count(spriteXinfo) >= 10 then
  163.               set the movieTime of sprite x to getAt(spriteXinfo, 9)
  164.               set the movieRate of sprite x to getAt(spriteXinfo, 10)
  165.             end if
  166.           end if
  167.         end if
  168.       end if
  169.       deleteAt(spriteList, 1)
  170.     end repeat
  171.   end if
  172. end
  173.  
  174. on find startFrame, endFrame, startCast, endCast
  175.   set findList to []
  176.   put RETURN & "Results, sorted by frame:"
  177.   repeat with x = startFrame to endFrame
  178.     go(x)
  179.     repeat with y = 1 to 48
  180.       if the type of sprite y > 0 then
  181.         repeat with z = startCast to endCast
  182.           if the castNum of sprite y = z then
  183.             put "Frame " & x & ", channel " & y & " contains cast number " & z & "."
  184.             append(findList, [x, y, z])
  185.           end if
  186.         end repeat
  187.       end if
  188.     end repeat
  189.   end repeat
  190.   put RETURN & "Results, sorted by channel:"
  191.   repeat with x = 1 to 48
  192.     repeat with y = 1 to count(findList)
  193.       set dataCell to getAt(findList, y)
  194.       set whichChannel to getAt(dataCell, 2)
  195.       if whichChannel = x then
  196.         set whichFrame to getAt(dataCell, 1)
  197.         set whichCast to getAt(dataCell, 3)
  198.         put "Frame " & whichFrame & ", channel " & whichChannel & " contains cast number " & whichCast & "."
  199.       end if
  200.     end repeat
  201.   end repeat
  202.   put RETURN & "Results, sorted by cast:"
  203.   repeat with x = startCast to endCast
  204.     repeat with y = 1 to count(findList)
  205.       set dataCell to getAt(findList, y)
  206.       set whichCast to getAt(dataCell, 3)
  207.       if whichCast = x then
  208.         set whichFrame to getAt(dataCell, 1)
  209.         set whichChannel to getAt(dataCell, 2)
  210.         put "Frame " & whichFrame & ", channel " & whichChannel & " contains cast number " & whichCast & "."
  211.       end if
  212.     end repeat
  213.   end repeat
  214.   put "Done."
  215.   beep(3)
  216. end
  217.  
  218. on checkScripts startFrame, endFrame, checkSpritesToo
  219.   repeat with x = startFrame to endFrame
  220.     go(x)
  221.     set thisScriptCast to the frameScript
  222.     if thisScriptCast > 0 then
  223.       set thisScriptText to the scriptText of cast thisScriptCast
  224.       if not (thisScriptText contains "exitFrame") then
  225.         put RETURN & "ΓÇóΓÇóΓÇó Frame " & x & ", Frame Script, Cast " & thisScriptCast & ":"
  226.         put RETURN & thisScriptText & RETURN
  227.       end if
  228.     end if
  229.     if checkSpritesToo then
  230.       repeat with y = 1 to 48
  231.         if the type of sprite y > 0 then
  232.           set thisScriptCast to the scriptNum of sprite y
  233.           if thisScriptCast > 0 then
  234.             set thisScriptText to the scriptText of cast thisScriptCast
  235.             if not (thisScriptText contains "mouseDown") then
  236.               put RETURN & "ΓÇóΓÇóΓÇó Frame " & x & ", Sprite " & y & ", Sprite Script, Cast " & thisScriptCast & ":"
  237.               put RETURN & thisScriptText & RETURN
  238.             end if
  239.           end if
  240.         end if
  241.       end repeat
  242.     end if
  243.     if (x mod 50) = 0 then
  244.       put x & " Frames complete."
  245.       unLoadCast()
  246.     end if
  247.   end repeat
  248.   put "Done."
  249.   beep(3)
  250. end
  251.